<%@ page import="java.util.Map" %>
<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: zhu
  Date: 2019/5/18
  Time: 16:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台用户中心</title>
    <link rel="stylesheet" type="text/css" href="statics/css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="statics/css/style.css" />
</head>

<body>
<%!String username;%>
<%!String phone;%>
<%!String password;%>
<%!String img;%>
<%
    Map<String,String> user =(Map<String ,String>)request.getSession().getAttribute("USER");

    if(user == null) {
%>
<script>
    alert("用户未登录");
</script>
<%
  response.sendRedirect("login1.jsp");
    }
%>
<% username = user.get("username");%>
<% phone = user.get("phone");%>
<% password = user.get("password");%>
<% img = user.get("img");%>
<div class="header">
    <div class="bar">
        <div class="w1200">
            <span class="l">莞工网<font>用户中心</font></span>
            <span class="r"><a href="https://cas.dgut.edu.cn/logout?callback=http://localhost:8080/exit"><i class="icon iconfont icon-dianyuan"></i>退出</a></span>
        </div>
    </div>
    <div class="user-info">
        <div class="w1200">
            <div class="user-headface">
                <img src="http://localhost:8080/photo/<%=img%>"/>
            </div>
            <div class="user-account">
                <p class="tip">您好,现在是 <%
                    out.print(new Date());
                %> </p>
                <p class="account">
                    <span><%out.print("帐户名："+username);%></span>
                </p>
            </div>
            <form action="upload_servlet"  enctype="multipart/form-data"  method="post" >
            <div class="user-modify">
                 上传头像
            </div>
                <div style="position: absolute;left: 1380px;top: 75px">
                    <input name="userhead" type="file" ><br>
                    <input type="submit" name="upload" value="上传" />
                </div>
            </form>
            </div>
        </div>
    </div>
</div>
<div class="main w1200">
    <div class="left">
        <ul>
            <li>
                <a href="#"  class="active">
                    <i class="icon iconfont icon-geren"></i>
                    个人资料
                </a>
            </li>
        </ul>
    </div>
    <div class="right">
        <div class="tap">
            <span>个人资料</span>
        </div>
        <div class="container">
            <div class="no-doc">
                <div>
                    <ul>
                        <br>
                        <li><%out.print("您的账户名："+username );%></li>
                        <br>
                        <li><%out.print("您的手机号码："+phone);%></li>
                        <br>
                        <li><%out.print("您的密码："+password);%></li>

                    </ul>
                </div>

            </div>
        </div>
    </div>
</div>
</body>

</html>


</html>
